Skip to content

[PGS]K번째 수 - #56

Open
yangyeeeun wants to merge 1 commit into
mainfrom
yee/k-number
Open

[PGS]K번째 수#56
yangyeeeun wants to merge 1 commit into
mainfrom
yee/k-number

Conversation

@yangyeeeun

Copy link
Copy Markdown
Collaborator

🍪 문제 이름

Resolve: K번째


🍊 문제 정의

input
array=[1, 5, 2, 6, 3, 7, 4]
commands=[[2, 5, 3], [4, 4, 1], [1, 7, 3]]
*

output
[5, 6, 3]
*


🍑 알고리즘 설계

풀이 과정에서 본인이 생각한 내용을 작성해 주세요.
Arrays의 copyOfRange함수를 이용해서 원하는 위치의 배열을 자른 후 자른 배열을 sort하였습니다.

# 특히 리뷰받고 싶은 코드 일부를 여기에 작성해 주세요.

int[] arr = Arrays.copyOfRange(array,commands[i][0]-1,commands[i][1]);
Arrays.sort(arr);

🥝 최악 수행 시간 복잡도

  • O()

🍰 특이 사항 (Optional)

참고 자료나 추가로 설명하고 싶은 내용을 작성해 주세요.

@yangyeeeun yangyeeeun self-assigned this Jul 6, 2026
@yangyeeeun yangyeeeun linked an issue Jul 6, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[PGS] K번째 수 / level1

1 participant